#include <iostream>
#include <string>

using namespace std;

int num = 1 ;

class stu
{
private:
    int val;
public:
    stu()
    {
        val = num++;
        cout << "我是:" << val << "构建了" << endl;
    }
    stu(int stu_val)
    {
        val = stu_val;
        cout << "我是:" << val << "构建了" << endl;
    }
    ~stu()
    {
        cout << "我是:" << val << "析构了" << endl;
    }
};


int main(int argc, char const *argv[])
{
    stu s1(1);
    stu s2(2);
    stu s3(3);
    stu s4(4);

    stu * s_p_1 = new stu;
    stu * s_p_2 = new stu;
    stu * s_p_3 = new stu;
    stu * s_p_4 = new stu;

    delete s_p_1;
    delete s_p_2;
    delete s_p_3;
    delete s_p_4;

    return 0;
}
